package 遍历;

//获取数组最大值

public class test02 {
    public static void main(String[] args) {
        int[] arr = {45, 56, 98, 25, 65, 78, 93, 75};
        int max = arr[0];
        for (int i = 1; i < arr.length; i++) {
            if (max < arr[i]) {
                max = arr[i];
            }
        }
        System.out.println("max:" + max);
    }
}
